import { Input } from "antd";
import "./index.less";
import { BasicForm, FormSchema, useForm } from "@/components/Form";
import { BasicColumn, BasicTable, useTable } from "@/components/Table";
import { useTranslation } from "react-i18next";
const index = () => {
	const { t } = useTranslation();
	const en_vi = "Hospitalization.additionalImages";
	const schemas: FormSchema[] = [
		{
			label: t(`${en_vi}.diseaseCourse`),
			field: "DiseaseCourse ", //病程（发病、进展、诊断、下级治疗等）
			component: "Input",
			colProps: {
				span: 24
			}
		},
		{
			label: t(`${en_vi}.personalMedicalHistory`),
			field: "Personal ", //病史（自身：从小到大的体能发展，所患疾病，治疗方法，饮食，预防接种等）
			component: "Input",
			colProps: {
				span: 24
			}
		},
		{
			label: t(`${en_vi}.coronaryStentPlacementIndication`),
			field: "Indication ", //冠状动脉支架植入前费用
			component: "Input"
		},
		{
			label: t(`${en_vi}.time`),
			field: "Indication ", //时间
			component: "DatePicker"
		},
		{
			label: t(`${en_vi}.quantity`),
			field: "Quantity ", //数量
			component: "Input"
		},
		{
			label: t(`${en_vi}.type`),
			field: "Type ", //类型
			component: "Input"
		},
		// {
		// 	label: "Need for Coronary Bypass Surgery",
		// 	field: "Need ", //冠状动脉支架植入前指示
		// 	component: "Input"
		// },
		// {
		// 	label: "Time",
		// 	field: "NeedIndication ", //时间
		// 	component: "DatePicker"
		// },
		{
			label: t(`${en_vi}.bypassGraftsLocationAndNumber`),
			field: "NeedQuantity ", // 搭桥位置和数量
			component: "Input"
		},
		{
			label: t(`${en_vi}.relevantDiseaseCharacteristics`),
			field: "Characteristics ", // 疾病相关特征
			component: "Input"
		},
		{
			label: t(`${en_vi}.family`),
			field: "Family ", // 家庭：家庭成员的相关情况：所患疾病，生活方式，精神状态等
			component: "Input"
		}
	];
	const [register] = useForm({
		schemas,
		labelWidth: 120,
		showActionButtonGroup: true,
		baseColProps: {
			span: 6
		}
	});
	const medicalSchemas: FormSchema[] = [
		{
			label: t(`${en_vi}.general`),
			field: "DiseaseCourse ", //全身（意识，皮肤黏膜，淋巴系统，甲状腺，位置，大小等）
			component: "Input"
		},
		{
			label: t(`${en_vi}.circulatory`),
			field: "Circulatory ", // 循环
			component: "Input"
		},
		{
			label: t(`${en_vi}.respiratory`),
			field: "Respiratory ", //呼吸
			component: "Input"
		},
		{
			label: t(`${en_vi}.digestive`),
			field: "Digestive ", //消化
			component: "Input"
		}
	];
	const [medicalRegister] = useForm({
		schemas: medicalSchemas,
		labelWidth: 120,
		showActionButtonGroup: false,
		baseColProps: {
			span: 6
		}
	});
	const columns: BasicColumn[] = [
		{
			title: t(`${en_vi}.graftNumber`),
			dataIndex: "GraftNumber"
		},
		{
			title: t(`${en_vi}.quantity`),
			dataIndex: "Quantity"
		},
		{
			title: t(`${en_vi}.locationAndNumberOfBypassGrafts`),
			dataIndex: "Location"
		}
	];
	const [tableRegister] = useTable({
		columns,
		useSearchForm: false,
		bordered: true
	});
	return (
		<div className="medicalRecord block">
			<h1 className="block-label">A、{t(`${en_vi}.medicalRecord`)}</h1>
			<div className="flex">
				<p className="block-label nowrap">Ⅰ、 {t(`${en_vi}.reasonForAdmission`)}</p>
				<Input></Input>
			</div>
			<div>
				<h1 className="block-label">Ⅱ、{t(`${en_vi}.medicalInquiry`)}</h1>
				<BasicForm register={register}></BasicForm>
				<BasicTable register={tableRegister}></BasicTable>
			</div>
			<div>
				<h1 className="block-label">Ⅲ、{t(`${en_vi}.medicalExamination`)}</h1>
				<BasicForm register={medicalRegister}></BasicForm>
			</div>
		</div>
	);
};
export default index;
